function authenticate() {
    $.ajax({
        url:"/authentication_",
        type:"POST",
        dataType: "json",
        contentType: "application/json;charset=utf-8",
        success:function (response) {
            if(response.data!==null){
                $(".authTab").hide();
                $(".user").show();
                $(".publish").show();
                $(".avatarUrl").attr("src",response.data.avatarUrl);
                $(".role").attr("value",response.data.role.id);
                if(response.data.role.id===2){
                    $(".recruitTab").show();
                }
            }
            console.log(response);
        },
        error:function (error) {
            console.log(error);
        }
    });
}
function activatingMarkDown() {
    $(function () {
        var editor = editormd("editor",{
           width:"100%",
            height:"",
            path:"/js/lib/",
            delay:0,
            watch:true,
            placeholder:"详细内容",
            imageUpload: true,
            imageFormats:  ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
            imageUploadURL: "/file/uploadImg"
        });
    });
}

